package com.java1234.rocketmq;

import org.apache.rocketmq.spring.annotation.ConsumeMode;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.annotation.RocketMQTransactionListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.apache.rocketmq.spring.core.RocketMQLocalTransactionListener;
import org.apache.rocketmq.spring.core.RocketMQLocalTransactionState;
import org.springframework.messaging.Message;
import org.springframework.stereotype.Component;

/**
 * @author zhaolin
 * @version 1.0
 * @description: TODO 事务消息
 * @date 2025/2/7 12:00
 */
@RocketMQMessageListener(topic = "java1234-rocketmq-orderly",consumerGroup
        ="${rocketmq.consumer.group}" )
//@Component
public class TransactionListenerImpl implements RocketMQListener<String> {
    @Override
    public void onMessage(String s) {
        System.out.println("消费者：收到消息内容："+s);
    }
}
